<template>
    <div class="brand_detail">
      <div class="brand_detail_top">
        <img :src="brandData.list_pic_url" alt="" />
        <h2>{{ brandData.name }}</h2>
      </div>
      <div class="brand_detail_center">
        <p>{{ brandData.simple_desc }}</p>
      </div>
    </div>
  </template>
  
  <script>
  import { GetPinPai } from "@/request/api.js";
  
  export default {
    name: "Brand",
    data() {
      return {
        brandData: {},
      };
    },
    created() {
      //获取对应id品牌信息
      this.GetPinPai();
    },
    methods: {
      //获取对应id品牌方法
      // async getBrandDetailList() {
      //   let res = await  GetPinPai
      //   if (res.data.errno == 0) {
      //     this.brandData = res.data.data.brand;
      //   }
      //   // console.log(res);
      // },
      GetPinPai() {
        GetPinPai({ id: this.$route.query.id }).then(res=>{
          // console.log(res);
          this.brandData = res.data.brand;
        })
      }
    },
  };
  </script>
  
  <style lang="less" scoped>
  .brand_detail {
    width: 100%;
    .brand_detail_top {
      position: relative;
      img {
        width: 100%;
      }
      h2 {
        position: absolute;
        bottom: 0;
        top: 0;
        height: 30px;
        width: 100%;
        margin: auto;
        text-align: center;
        color: #fff;
        font-size: 20px;
        text-decoration: underline;
      }
    }
    .brand_detail_center {
      width: 100%;
      p {
        background: #fff;
        font-size: 18px;
        text-align: center;
        padding: 20px 10px;
        line-height: 26px;
        color: #666;
      }
    }
  }
  </style>